package com.jk1123.us.api.entity;

import com.jk1123.us.common.entity.GMTBase;
import com.jk1123.us.core.ShortUrl;
import lombok.Data;
import org.springframework.beans.BeanUtils;

/**
 * @author huyoufu <https://github.com/huyoufu>
 * @TIME 2021-09-17 01:54
 * @description
 */
@Data
public class Record extends GMTBase {
    /**
     * 短地址
     */
    private long shortUrl;
    /**
     * 长地址
     */
    private String longUrl;
    /**
     * 有效时间 -1 表示永久有效 以秒为单位
     */
    private long life=-1;
    /**
     * 访问密码
     */
    private String password;
    /**
     * 归属的appId 主要是租户模式下的场景
     */
    private String appId;

    /**
     * 所归属的短链域名
     */
    private String domain;

    public static void main(String[] args) {

        ShortUrl shortUrl = new ShortUrl();
        shortUrl.setAppId("1");
        shortUrl.setLongUrl("https://blog.csdn.net/qq_44986537/article/details/115279078");
        shortUrl.setShortUrl(2141241231112L);
        shortUrl.setPassword("123412");

        Record record = new Record();

        BeanUtils.copyProperties(shortUrl,record);

        System.out.println(record.getGmtModify());

    }

}
